package com.cjy.expenses.service;

import com.base.common.persistent.model.TransactionDetail;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 缴费有关service
 * 
 * @author kat.luhongkai
 *
 */
public interface ExpensesService {

	Map<String, Object> getAlipayInfo(int fee, String revFeeIdsArr, String terminalCode, int userId, int bid) throws Exception;

	/**
	 *
	 * @param fee    总费用
	 * @param username    用户名
	 * @param phone        电话
	 * @param address    地址
	 * @param terminalCode    设备码
	 * @param userType 用户类型 0 会员 1游客
     * @param cUname
	 * @return
     */
	Map<String, Object> getShopAlipayInfo(int fee, String username, String phone, String address, String terminalCode, int userType, String revFeeIdsArr, String cUname);

	/**
	 * 获取单个物业缴费信息表单
	 * @param endTime 
	 * @param startTime
	 * @param categories 
	 * @return
	 */
	List<Map<String, Object>> getExpensesInfo(String ResID, String startTime, String endTime, int compoundsId, String categories);

	Map<String, Object> getShopWeixinPayInfo(int fee, String username, String phone, String address, int userType, String revFeeIdsArr, String terminalCode, String body, String cUname) throws InstantiationException, IllegalAccessException, IOException, ClassNotFoundException;

	Map<String, Object> getWeixinPayInfo(int fee, String revFeeIdsArr, String terminalCode, int userId, int bid, String body) throws Exception;

	int queryOrderStatus(String out_trade_no);

	int queryShopOrderStatus(String out_trade_no);

	int subPaied(int userId, double money);

	/**
	 * 查询已缴费信息列表
	 * 
	 * @param userId
	 * @param code
	 * @param bid
	 * @param startTime
	 * @param endTime
	 * @param page
	 * @return
	 */
	List<Map<String, Object>> queryPaidInfoList(int userId, String code, int bid, String startTime,
												String endTime, int page);

	List<TransactionDetail> queryPaidInfoDetail(int transactionId);

	Object queryPaidInfoListCounts(int userId, String code, int bid,
			String startTime, String endTime);

	Map<String, String> getUnionpayInfo(int fee, String revFeeIdsArr, String code,
			int userId, int bid, String body) throws Exception;
	Map<String, String> getShopUnionpayInfo(int fee, String username, String phone, String address, int userType, String revFeeIdsArr, String code, String body, String cUname);

	Object unionpayVerifyAppData(String unJson);

	Object shopUnionpayVerifyAppData(String unJson);

	Object queryUnionpayOrderStatus(String out_trade_no, String txnTime);

	Object queryShopUnionpayOrderStatus(String out_trade_no, String txnTime);

	int addShopUserInfo(String username, String phone, String address, String code, int userType);

	Object queryShopUserReceivingInfo(String code);

	int updateShopUserReceivingInfo(String username, String phone, String address, Long receivingInfoId);

	int deleteShopUserReceivingInfo(Long receivingInfoId);

	int queryShopScore(String code);

	Object queryShopOrderByTerminalCode(String code);

	int updateShopOrderStatus(String out_trade_no, int status);

	Object queryShopOrderByStatus();
}
